home *** CD-ROM | disk | FTP | other *** search
Text File | 1990-04-27 | 895 b | 25 lines | [TEXT/GEOL] |
- Item 9747867 23-April-90 17:40PDT
-
- From: MIKE.VILOT ObjectWare, Michael Vilot,PRT
-
- To: DEREK White, Derek
-
- cc: CPLUS.APPLE$ C++ Interest List--Apple Employees
- CPLUS.DEV$ C++ Interest List--Developers
-
- Sub: Re: Copy Cconstructors & op=
-
- Copying and assigning are indeed similar. In cases where the default
- member-wise semantics aren't sufficient, but copying and assigning are
- semantically the same, then it may indeed be simpler to implement one in terms
- of the other.
-
- The main distinction is that a constructor is building a _new_ object, while
- operator= is overwriting an _existing_ object. There may be cases (reference
- counting springs to mind) where the details of these two operations are in fact
- different.
-
- Hope this helps,
- Mike
-
-